<template>
	<view class="c1">
		<view class="tags">
			<view class="tag" v-for="(itme,index) in list" :key="index">
				<u-tag class="tag_l" :text="itme.tag" :bg-color="itme.color" mode="dark" closeable :show="itme.show"
					@close="tagClick(index)" shape="circleLeft" />
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		name: "tag",
		data() {
			return {
				list: [{
					tag: '随笔',
					show: true,
					color: "#08ffc8"
				}, {
					tag: '吐槽',
					show: true,
					color: "#fae3d9"
				}, {
					tag: '求助',
					show: true,
					color: "#fe5f55"
				}, {
					tag: '表白',
					show: true,
					color: "#ffb6b9"
				}, {
					tag: '询问',
					show: true,
					color: "#bbded6"
				}, ]
			};
		},
		methods: {
			tagClick(index) {
				this.list[index].show = false;
			}
		}
	}
</script>

<style lang="less">
	.c1{
		width: 750rpx;
		border-bottom: 2px solid;
		height: auto;
		display: flex;
		justify-content: center;
		align-items: center;
		border-image: linear-gradient(to right, #ffb6b9, #bbded6) 1;
		.tags {
			margin-top: 30rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-wrap: wrap;
			margin-bottom: 30rpx;
		}
		
		.tag_l {
			margin: 10rpx;
		}
	}
</style>
